package com.huawei.translate.vo.user;

import com.huawei.translate.model.Renter;

public class RenterDto {
    private String appKey;
    private String appName;
    private String id;
    private String category;
    private String role;

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public static RenterDto toDto(Renter renter) {
        RenterDto renterDto = new RenterDto();
        renterDto.setAppKey(renter.getAppKey());
        renterDto.setAppName(renter.getAppName());
        renterDto.setId(renter.getId());
        renterDto.setCategory(renter.getCategory());
        renterDto.setRole(UserRoleType.getRole(renter.getRole()).getDescription());
        return renterDto;
    }
}
